@foreach($sidebars as $item)
    @if(!isset($item['child']))
        <li @if(isset($item['isActive']) && $item['isActive'])) class="active" @endif>
            <a href="{{$item['url']}}">
                <i class="fa {{$item['icon']}}"></i>
                <span>{{ $item['name'] }}</span>
            </a>
        </li>
    @else
        <li class="treeview">
            <a href="#">
                <i class="fa {{$item['icon']}}"></i>
                <span>{{ $item['name'] }}</span>
                <span class="pull-right-container">
                  <i class="fa fa-angle-left pull-right"></i>
                </span>
            </a>
            <ul class="treeview-menu">
                @component('admin.component.sidebar-show', ['sidebars' => $item['child'], 'count'=> (++$count)])
                @endcomponent
            </ul>
        </li>
    @endif
@endforeach